package lily.phs.object;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import lily.phs.database.Constants;
/**
 * 重性精神疾病患者随访记录表---数据封装类
 * @author heck
 *
 */

public class VisitMentals implements Constants {
	
	private Context mContext;
	
	private int vime_profileid = -1;
    private int vime_times = -1;
    private String vime_date = "";
    private int vime_danger_state = -1;
    private String vime_symptoms = "";
    private String vime_symptom_other = "";
    private int vime_insight = -1;
    private int vime_sleep = -1;
    private int vime_diet = -1;
    private int vime_social_personal_life = -1;
    private int vime_social_family = -1;
    private int vime_social_work = -1;
    private int vime_social_study = -1;
    private int vime_social_com = -1;
    private String vime_influence = "";
    private int vime_influ_trouble = -1;
    private int vime_influ_accident = -1;
    private int vime_influ_disaster = -1;
    private int vime_influ_injure = -1;
    private int vime_influ_suicide = -1;
    private int vime_lock = -1;
    private int vime_hospital = -1;
    private String vime_last_leave_hos_date = "";
    private int vime_has_lab_check = -1;
    private String vime_lab_check = "";
    private int vime_medi_comply = -1;
    private int vime_has_drug_reaction = -1;
    private String vime_drug_reaction = "";
    private int vime_treatment = -1;
    private int vime_need_transfer = -1;
    private String vime_transfer_reason = "";
    private String vime_transfer_hospital = "";
    private String vime_medicine_1 = "";
    private int vime_medi_1_usage = -1;
    private float vime_medi_1_dosage = -1f;
    private String vime_medicine_2 = "";
    private int vime_medi_2_usage = -1;
    private float vime_medi_2_dosage = -1f;
    private String vime_medicine_3 = "";
    private int vime_medi_3_usage = -1;
    private float vime_medi_3_dosage = -1f;
    private String vime_recover = "";
    private String vime_recover_other = "";
    private int vime_classify = -1;
    private String vime_next_visit_time = "";
    private String vime_doctor = "";
    
	public VisitMentals(Context context) {
		this.mContext = context;
	}

	public int getVime_profileid() {
		return vime_profileid;
	}

	public void setVime_profileid(int vime_profileid) {
		this.vime_profileid = vime_profileid;
	}

	public int getVime_times() {
		return vime_times;
	}

	public void setVime_times(int vime_times) {
		this.vime_times = vime_times;
	}

	public String getVime_date() {
		return vime_date;
	}

	public void setVime_date(String vime_date) {
		this.vime_date = vime_date;
	}

	public int getVime_danger_state() {
		return vime_danger_state;
	}

	public void setVime_danger_state(int vime_danger_state) {
		this.vime_danger_state = vime_danger_state;
	}

	public String getVime_symptoms() {
		return vime_symptoms;
	}

	public void setVime_symptoms(String vime_symptoms) {
		this.vime_symptoms = vime_symptoms;
	}

	public String getVime_symptom_other() {
		return vime_symptom_other;
	}

	public void setVime_symptom_other(String vime_symptom_other) {
		this.vime_symptom_other = vime_symptom_other;
	}

	public int getVime_insight() {
		return vime_insight;
	}

	public void setVime_insight(int vime_insight) {
		this.vime_insight = vime_insight;
	}

	public int getVime_sleep() {
		return vime_sleep;
	}

	public void setVime_sleep(int vime_sleep) {
		this.vime_sleep = vime_sleep;
	}

	public int getVime_diet() {
		return vime_diet;
	}

	public void setVime_diet(int vime_diet) {
		this.vime_diet = vime_diet;
	}

	public int getVime_social_personal_life() {
		return vime_social_personal_life;
	}

	public void setVime_social_personal_life(int vime_social_personal_life) {
		this.vime_social_personal_life = vime_social_personal_life;
	}

	public int getVime_social_family() {
		return vime_social_family;
	}

	public void setVime_social_family(int vime_social_family) {
		this.vime_social_family = vime_social_family;
	}

	public int getVime_social_work() {
		return vime_social_work;
	}

	public void setVime_social_work(int vime_social_work) {
		this.vime_social_work = vime_social_work;
	}

	public int getVime_social_study() {
		return vime_social_study;
	}

	public void setVime_social_study(int vime_social_study) {
		this.vime_social_study = vime_social_study;
	}

	public int getVime_social_com() {
		return vime_social_com;
	}

	public void setVime_social_com(int vime_social_com) {
		this.vime_social_com = vime_social_com;
	}

	public String getVime_influence() {
		return vime_influence;
	}

	public void setVime_influence(String vime_influence) {
		this.vime_influence = vime_influence;
	}

	public int getVime_influ_trouble() {
		return vime_influ_trouble;
	}

	public void setVime_influ_trouble(int vime_influ_trouble) {
		this.vime_influ_trouble = vime_influ_trouble;
	}

	public int getVime_influ_accident() {
		return vime_influ_accident;
	}

	public void setVime_influ_accident(int vime_influ_accident) {
		this.vime_influ_accident = vime_influ_accident;
	}

	public int getVime_influ_disaster() {
		return vime_influ_disaster;
	}

	public void setVime_influ_disaster(int vime_influ_disaster) {
		this.vime_influ_disaster = vime_influ_disaster;
	}

	public int getVime_influ_injure() {
		return vime_influ_injure;
	}

	public void setVime_influ_injure(int vime_influ_injure) {
		this.vime_influ_injure = vime_influ_injure;
	}

	public int getVime_influ_suicide() {
		return vime_influ_suicide;
	}

	public void setVime_influ_suicide(int vime_influ_suicide) {
		this.vime_influ_suicide = vime_influ_suicide;
	}

	public int getVime_lock() {
		return vime_lock;
	}

	public void setVime_lock(int vime_lock) {
		this.vime_lock = vime_lock;
	}

	public int getVime_hospital() {
		return vime_hospital;
	}

	public void setVime_hospital(int vime_hospital) {
		this.vime_hospital = vime_hospital;
	}

	public String getVime_last_leave_hos_date() {
		return vime_last_leave_hos_date;
	}

	public void setVime_last_leave_hos_date(String vime_last_leave_hos_date) {
		this.vime_last_leave_hos_date = vime_last_leave_hos_date;
	}

	public int getVime_has_lab_check() {
		return vime_has_lab_check;
	}

	public void setVime_has_lab_check(int vime_has_lab_check) {
		this.vime_has_lab_check = vime_has_lab_check;
	}

	public String getVime_lab_check() {
		return vime_lab_check;
	}

	public void setVime_lab_check(String vime_lab_check) {
		this.vime_lab_check = vime_lab_check;
	}

	public int getVime_medi_comply() {
		return vime_medi_comply;
	}

	public void setVime_medi_comply(int vime_medi_comply) {
		this.vime_medi_comply = vime_medi_comply;
	}

	public int getVime_has_drug_reaction() {
		return vime_has_drug_reaction;
	}

	public void setVime_has_drug_reaction(int vime_has_drug_reaction) {
		this.vime_has_drug_reaction = vime_has_drug_reaction;
	}

	public String getVime_drug_reaction() {
		return vime_drug_reaction;
	}

	public void setVime_drug_reaction(String vime_drug_reaction) {
		this.vime_drug_reaction = vime_drug_reaction;
	}

	public int getVime_treatment() {
		return vime_treatment;
	}

	public void setVime_treatment(int vime_treatment) {
		this.vime_treatment = vime_treatment;
	}

	public int getVime_need_transfer() {
		return vime_need_transfer;
	}

	public void setVime_need_transfer(int vime_need_transfer) {
		this.vime_need_transfer = vime_need_transfer;
	}

	public String getVime_transfer_reason() {
		return vime_transfer_reason;
	}

	public void setVime_transfer_reason(String vime_transfer_reason) {
		this.vime_transfer_reason = vime_transfer_reason;
	}

	public String getVime_transfer_hospital() {
		return vime_transfer_hospital;
	}

	public void setVime_transfer_hospital(String vime_transfer_hospital) {
		this.vime_transfer_hospital = vime_transfer_hospital;
	}

	public String getVime_medicine_1() {
		return vime_medicine_1;
	}

	public void setVime_medicine_1(String vime_medicine_1) {
		this.vime_medicine_1 = vime_medicine_1;
	}

	public int getVime_medi_1_usage() {
		return vime_medi_1_usage;
	}

	public void setVime_medi_1_usage(int vime_medi_1_usage) {
		this.vime_medi_1_usage = vime_medi_1_usage;
	}

	public float getVime_medi_1_dosage() {
		return vime_medi_1_dosage;
	}

	public void setVime_medi_1_dosage(float vime_medi_1_dosage) {
		this.vime_medi_1_dosage = vime_medi_1_dosage;
	}

	public String getVime_medicine_2() {
		return vime_medicine_2;
	}

	public void setVime_medicine_2(String vime_medicine_2) {
		this.vime_medicine_2 = vime_medicine_2;
	}

	public int getVime_medi_2_usage() {
		return vime_medi_2_usage;
	}

	public void setVime_medi_2_usage(int vime_medi_2_usage) {
		this.vime_medi_2_usage = vime_medi_2_usage;
	}

	public float getVime_medi_2_dosage() {
		return vime_medi_2_dosage;
	}

	public void setVime_medi_2_dosage(float vime_medi_2_dosage) {
		this.vime_medi_2_dosage = vime_medi_2_dosage;
	}

	public String getVime_medicine_3() {
		return vime_medicine_3;
	}

	public void setVime_medicine_3(String vime_medicine_3) {
		this.vime_medicine_3 = vime_medicine_3;
	}

	public int getVime_medi_3_usage() {
		return vime_medi_3_usage;
	}

	public void setVime_medi_3_usage(int vime_medi_3_usage) {
		this.vime_medi_3_usage = vime_medi_3_usage;
	}

	public float getVime_medi_3_dosage() {
		return vime_medi_3_dosage;
	}

	public void setVime_medi_3_dosage(float vime_medi_3_dosage) {
		this.vime_medi_3_dosage = vime_medi_3_dosage;
	}

	public String getVime_recover() {
		return vime_recover;
	}

	public void setVime_recover(String vime_recover) {
		this.vime_recover = vime_recover;
	}

	public String getVime_recover_other() {
		return vime_recover_other;
	}

	public void setVime_recover_other(String vime_recover_other) {
		this.vime_recover_other = vime_recover_other;
	}

	public int getVime_classify() {
		return vime_classify;
	}

	public void setVime_classify(int vime_classify) {
		this.vime_classify = vime_classify;
	}

	public String getVime_next_visit_time() {
		return vime_next_visit_time;
	}

	public void setVime_next_visit_time(String vime_next_visit_time) {
		this.vime_next_visit_time = vime_next_visit_time;
	}

	public String getVime_doctor() {
		return vime_doctor;
	}

	public void setVime_doctor(String vime_doctor) {
		this.vime_doctor = vime_doctor;
	}
	
	/**
	 * 查询并初始化对象
	 * @param id 档案编号
	 * @param times 随访次数
	 */
	public void selectVisitMentals(int id, int times){
	    String where = VIME_PROFILEID + "=" + id +" and "+ VIME_TIMES +"="+ times;
		Cursor cursor = mContext.getContentResolver().query(CONTENT_URI_TB24, null, where, null, null);
		while(cursor.moveToNext()){
			this.vime_profileid = cursor.getInt(cursor.getColumnIndex(VIME_PROFILEID));
		    this.vime_times = cursor.getInt(cursor.getColumnIndex(VIME_TIMES));
		    this.vime_date = cursor.getString(cursor.getColumnIndex(VIME_DATE));
		    this.vime_danger_state = cursor.getInt(cursor.getColumnIndex(VIME_DANGER_STATE));
		    this.vime_symptoms = cursor.getString(cursor.getColumnIndex(VIME_SYMPTOMS));
		    this.vime_symptom_other = cursor.getString(cursor.getColumnIndex(VIME_SYMPTOM_OTHER));
		    this.vime_insight = cursor.getInt(cursor.getColumnIndex(VIME_INSIGHT));
		    this.vime_sleep = cursor.getInt(cursor.getColumnIndex(VIME_SLEEP));
		    this.vime_diet = cursor.getInt(cursor.getColumnIndex(VIME_DIET));
		    this.vime_social_personal_life = cursor.getInt(cursor.getColumnIndex(VIME_SOCIAL_PERSONAL_LIFE));
		    this.vime_social_family = cursor.getInt(cursor.getColumnIndex(VIME_SOCIAL_FAMILY));
		    this.vime_social_work = cursor.getInt(cursor.getColumnIndex(VIME_SOCIAL_WORK));
		    this.vime_social_study = cursor.getInt(cursor.getColumnIndex(VIME_SOCIAL_STUDY));
		    this.vime_social_com = cursor.getInt(cursor.getColumnIndex(VIME_SOCIAL_COM));
		    this.vime_influence = cursor.getString(cursor.getColumnIndex(VIME_INFLUENCE));
		    this.vime_influ_trouble = cursor.getInt(cursor.getColumnIndex(VIME_INFLU_TROUBLE));
		    this.vime_influ_accident = cursor.getInt(cursor.getColumnIndex(VIME_INFLU_ACCIDENT));
		    this.vime_influ_disaster = cursor.getInt(cursor.getColumnIndex(VIME_INFLU_DISASTER));
		    this.vime_influ_injure = cursor.getInt(cursor.getColumnIndex(VIME_INFLU_INJURE));
		    this.vime_influ_suicide = cursor.getInt(cursor.getColumnIndex(VIME_INFLU_SUICIDE));
		    this.vime_lock = cursor.getInt(cursor.getColumnIndex(VIME_LOCK));
		    this.vime_hospital = cursor.getInt(cursor.getColumnIndex(VIME_HOSPITAL));
		    this.vime_last_leave_hos_date = cursor.getString(cursor.getColumnIndex(VIME_LAST_LEAVE_HOS_DATE));
		    this.vime_has_lab_check = cursor.getInt(cursor.getColumnIndex(VIME_HAS_LAB_CHECK));
		    this.vime_lab_check = cursor.getString(cursor.getColumnIndex(VIME_LAB_CHECK));
		    this.vime_medi_comply = cursor.getInt(cursor.getColumnIndex(VIME_MEDI_COMPLY));
		    this.vime_has_drug_reaction = cursor.getInt(cursor.getColumnIndex(VIME_HAS_DRUG_REACTION));
		    this.vime_drug_reaction = cursor.getString(cursor.getColumnIndex(VIME_DRUG_REACTION));
		    this.vime_treatment = cursor.getInt(cursor.getColumnIndex(VIME_TREATMENT));
		    this.vime_need_transfer = cursor.getInt(cursor.getColumnIndex(VIME_NEED_TRANSFER));
		    this.vime_transfer_reason = cursor.getString(cursor.getColumnIndex(VIME_TRANSFER_REASON));
		    this.vime_transfer_hospital = cursor.getString(cursor.getColumnIndex(VIME_TRANSFER_HOSPITAL));
		    this.vime_medicine_1 = cursor.getString(cursor.getColumnIndex(VIME_MEDICINE_1));
		    this.vime_medi_1_usage = cursor.getInt(cursor.getColumnIndex(VIME_MEDI_1_USAGE));
		    this.vime_medi_1_dosage = cursor.getFloat(cursor.getColumnIndex(VIME_MEDI_1_DOSAGE));
		    this.vime_medicine_2 = cursor.getString(cursor.getColumnIndex(VIME_MEDICINE_2));
		    this.vime_medi_2_usage = cursor.getInt(cursor.getColumnIndex(VIME_MEDI_2_USAGE));
		    this.vime_medi_2_dosage = cursor.getFloat(cursor.getColumnIndex(VIME_MEDI_2_DOSAGE));
		    this.vime_medicine_3 = cursor.getString(cursor.getColumnIndex(VIME_MEDICINE_3));
		    this.vime_medi_3_usage = cursor.getInt(cursor.getColumnIndex(VIME_MEDI_3_USAGE));
		    this.vime_medi_3_dosage = cursor.getFloat(cursor.getColumnIndex(VIME_MEDI_3_DOSAGE));
		    this.vime_recover = cursor.getString(cursor.getColumnIndex(VIME_RECOVER));
		    this.vime_recover_other = cursor.getString(cursor.getColumnIndex(VIME_RECOVER_OTHER));
		    this.vime_classify = cursor.getInt(cursor.getColumnIndex(VIME_CLASSIFY));
		    this.vime_next_visit_time = cursor.getString(cursor.getColumnIndex(VIME_NEXT_VISIT_TIME));
		    this.vime_doctor = cursor.getString(cursor.getColumnIndex(VIME_DOCTOR));
		}
	    cursor.close();
	}
	
	/**
	 * 将对象中的数据插入到数据库
	 */
	public void insertVisitMentals(){
		ContentValues value = new ContentValues();
	    value.put(VIME_PROFILEID , this.getVime_profileid());
	    value.put(VIME_TIMES , this.getVime_times());
	    value.put(VIME_DATE , this.getVime_date());
	    value.put(VIME_DANGER_STATE , this.getVime_danger_state());
	    value.put(VIME_SYMPTOMS , this.getVime_symptoms());
	    value.put(VIME_SYMPTOM_OTHER , this.getVime_symptom_other());
	    value.put(VIME_INSIGHT , this.getVime_insight());
	    value.put(VIME_SLEEP, this.getVime_sleep());
	    value.put(VIME_DIET , this.getVime_diet());
	    value.put(VIME_SOCIAL_PERSONAL_LIFE , this.getVime_social_personal_life());
	    value.put(VIME_SOCIAL_FAMILY , this.getVime_social_family());
	    value.put(VIME_SOCIAL_WORK , this.getVime_social_work());
	    value.put(VIME_SOCIAL_STUDY , this.getVime_social_study());
	    value.put(VIME_SOCIAL_COM , this.getVime_social_com());
	    value.put(VIME_INFLUENCE , this.getVime_influence());
	    value.put(VIME_INFLU_TROUBLE , this.getVime_influ_trouble());
	    value.put(VIME_INFLU_ACCIDENT , this.getVime_influ_accident());
	    value.put(VIME_INFLU_DISASTER , this.getVime_influ_disaster());
	    value.put(VIME_INFLU_INJURE , this.getVime_influ_injure());
	    value.put(VIME_INFLU_SUICIDE , this.getVime_influ_suicide());
	    value.put(VIME_LOCK , this.getVime_lock());
	    value.put(VIME_HOSPITAL , this.getVime_hospital());
	    value.put(VIME_LAST_LEAVE_HOS_DATE , this.getVime_last_leave_hos_date());
	    value.put(VIME_HAS_LAB_CHECK , this.getVime_has_lab_check());
	    value.put(VIME_LAB_CHECK , this.getVime_lab_check());
	    value.put(VIME_MEDI_COMPLY , this.getVime_medi_comply());
	    value.put(VIME_HAS_DRUG_REACTION , this.getVime_has_drug_reaction());
	    value.put(VIME_DRUG_REACTION , this.getVime_drug_reaction());
	    value.put(VIME_TREATMENT , this.getVime_treatment());
	    value.put(VIME_NEED_TRANSFER , this.getVime_need_transfer());
	    value.put(VIME_TRANSFER_REASON , this.getVime_transfer_reason());
	    value.put(VIME_TRANSFER_HOSPITAL , this.getVime_transfer_hospital());
	    value.put(VIME_MEDICINE_1 , this.getVime_medicine_1());
	    value.put(VIME_MEDI_1_USAGE , this.getVime_medi_1_usage());
	    value.put(VIME_MEDI_1_DOSAGE , this.getVime_medi_1_dosage());
	    value.put(VIME_MEDICINE_2 , this.getVime_medicine_2());
	    value.put(VIME_MEDI_2_USAGE , this.getVime_medi_2_usage());
	    value.put(VIME_MEDI_2_DOSAGE , this.getVime_medi_2_dosage());
	    value.put(VIME_MEDICINE_3 , this.getVime_medicine_3());
	    value.put(VIME_MEDI_3_USAGE , this.getVime_medi_3_usage());
	    value.put(VIME_MEDI_3_DOSAGE , this.getVime_medi_3_dosage());
	    value.put(VIME_RECOVER , this.getVime_recover());
	    value.put(VIME_RECOVER_OTHER , this.getVime_recover_other());
	    value.put(VIME_CLASSIFY , this.getVime_classify());
	    value.put(VIME_NEXT_VISIT_TIME , this.getVime_next_visit_time());
	    value.put(VIME_DOCTOR , this.getVime_doctor());
		
		mContext.getContentResolver().insert(CONTENT_URI_TB24, value);
		
	}

	/**
	 * 将对象中的数据更新至数据库
	 * @param id 档案编号
	 * @param times 随访次数
	 */
	public void updateVisitMentals(int id, int times){
		ContentValues value = new ContentValues();
	    value.put(VIME_PROFILEID , this.getVime_profileid());
	    value.put(VIME_TIMES , this.getVime_times());
	    value.put(VIME_DATE , this.getVime_date());
	    value.put(VIME_DANGER_STATE , this.getVime_danger_state());
	    value.put(VIME_SYMPTOMS , this.getVime_symptoms());
	    value.put(VIME_SYMPTOM_OTHER , this.getVime_symptom_other());
	    value.put(VIME_INSIGHT , this.getVime_insight());
	    value.put(VIME_SLEEP, this.getVime_sleep());
	    value.put(VIME_DIET , this.getVime_diet());
	    value.put(VIME_SOCIAL_PERSONAL_LIFE , this.getVime_social_personal_life());
	    value.put(VIME_SOCIAL_FAMILY , this.getVime_social_family());
	    value.put(VIME_SOCIAL_WORK , this.getVime_social_work());
	    value.put(VIME_SOCIAL_STUDY , this.getVime_social_study());
	    value.put(VIME_SOCIAL_COM , this.getVime_social_com());
	    value.put(VIME_INFLUENCE , this.getVime_influence());
	    value.put(VIME_INFLU_TROUBLE , this.getVime_influ_trouble());
	    value.put(VIME_INFLU_ACCIDENT , this.getVime_influ_accident());
	    value.put(VIME_INFLU_DISASTER , this.getVime_influ_disaster());
	    value.put(VIME_INFLU_INJURE , this.getVime_influ_injure());
	    value.put(VIME_INFLU_SUICIDE , this.getVime_influ_suicide());
	    value.put(VIME_LOCK , this.getVime_lock());
	    value.put(VIME_HOSPITAL , this.getVime_hospital());
	    value.put(VIME_LAST_LEAVE_HOS_DATE , this.getVime_last_leave_hos_date());
	    value.put(VIME_HAS_LAB_CHECK , this.getVime_has_lab_check());
	    value.put(VIME_LAB_CHECK , this.getVime_lab_check());
	    value.put(VIME_MEDI_COMPLY , this.getVime_medi_comply());
	    value.put(VIME_HAS_DRUG_REACTION , this.getVime_has_drug_reaction());
	    value.put(VIME_DRUG_REACTION , this.getVime_drug_reaction());
	    value.put(VIME_TREATMENT , this.getVime_treatment());
	    value.put(VIME_NEED_TRANSFER , this.getVime_need_transfer());
	    value.put(VIME_TRANSFER_REASON , this.getVime_transfer_reason());
	    value.put(VIME_TRANSFER_HOSPITAL , this.getVime_transfer_hospital());
	    value.put(VIME_MEDICINE_1 , this.getVime_medicine_1());
	    value.put(VIME_MEDI_1_USAGE , this.getVime_medi_1_usage());
	    value.put(VIME_MEDI_1_DOSAGE , this.getVime_medi_1_dosage());
	    value.put(VIME_MEDICINE_2 , this.getVime_medicine_2());
	    value.put(VIME_MEDI_2_USAGE , this.getVime_medi_2_usage());
	    value.put(VIME_MEDI_2_DOSAGE , this.getVime_medi_2_dosage());
	    value.put(VIME_MEDICINE_3 , this.getVime_medicine_3());
	    value.put(VIME_MEDI_3_USAGE , this.getVime_medi_3_usage());
	    value.put(VIME_MEDI_3_DOSAGE , this.getVime_medi_3_dosage());
	    value.put(VIME_RECOVER , this.getVime_recover());
	    value.put(VIME_RECOVER_OTHER , this.getVime_recover_other());
	    value.put(VIME_CLASSIFY , this.getVime_classify());
	    value.put(VIME_NEXT_VISIT_TIME , this.getVime_next_visit_time());
	    value.put(VIME_DOCTOR , this.getVime_doctor());
	    
	    String where = VIME_PROFILEID + "=" + id +" and "+ VIME_TIMES +"="+ times;
	    mContext.getContentResolver().update(CONTENT_URI_TB24, value, where, null);
	}
	
	/**
	 * 删除数据库中对应的记录
	 * @param id 档案编号
	 * @param times 随访次数
	 */
	public void deleteVisitMentals(int id, int times){
	    String where = VIME_PROFILEID + "=" + id +" and "+ VIME_TIMES +"="+ times;
		mContext.getContentResolver().delete(CONTENT_URI_TB24, where, null);
	}
	
	/**
	 * 删除患者全部的随访记录
	 * @param id 档案编号
	 */
	public void deleteVisitMentals(int id){
	    String where = VIME_PROFILEID + "=" + id;
		mContext.getContentResolver().delete(CONTENT_URI_TB24, where, null);
	}
	/**
	 * 记录的总次数
	 */
	public int getNumTimes(int id){
		int result = 0;
		String where = VIME_PROFILEID + "=" + id + "";
		Cursor cursor = mContext.getContentResolver().query(CONTENT_URI_TB24, null, where, null, null);
		result = cursor.getCount();
		
		return result;
	}
}
